package com.zbc.zbcservice.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class JasonResult {
    private Integer status;
    private String msg;
    private Object data;
    public static JasonResult fail(){
        return new JasonResult(201, "服务器处理失败", null);
    }
    public static JasonResult success(){
        return new JasonResult(200, "服务器处理成功", null);
    }
    public static JasonResult success(Object data){
        return new JasonResult(200, "服务器处理成功", data);
    }
    public static JasonResult success(String msg, Object data){
        return new JasonResult(200, msg, data);
    }
}